import Layout from '@/page/index/';

export default [
  {
    path: '/wel',
    component: Layout,
    redirect: '/wel/index',
    children: [
      {
        path: 'index',
        name: '首页',
        meta: {
          i18n: 'dashboard'
        },
        component: () => import(/* webpackChunkName: "index" */ '@/views/wel/index')
      },
      {
        path: 'dashboard',
        name: '控制台',
        meta: {
          i18n: 'dashboard',
          menu: false
        },
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/wel/dashboard')
      }
    ]
  },
  {
    path: '/test',
    component: Layout,
    redirect: '/test/index',
    children: [
      {
        path: 'index',
        name: '测试页',
        meta: {
          i18n: 'test'
        },
        component: () => import('@/views/util/test')
      }
    ]
  },
  {
    path: '/dict-horizontal',
    component: Layout,
    redirect: '/dict-horizontal/index',
    children: [
      {
        path: 'index',
        name: '字典管理',
        meta: {
          i18n: 'dict'
        },
        component: () => import(/* webpackChunkName: "dict-horizontal-views" */ '@/views/util/demo/dict-horizontal')
      }
    ]
  },
  {
    path: '/dict-vertical',
    component: Layout,
    redirect: '/dict-vertical/index',
    children: [
      {
        path: 'index',
        name: '字典管理',
        meta: {
          i18n: 'dict'
        },
        component: () => import(/* webpackChunkName: "dict-vertical-views" */ '@/views/util/demo/dict-vertical')
      }
    ]
  },
  {
    path: '/info',
    component: Layout,
    redirect: '/info/index',
    children: [
      {
        path: 'index',
        name: '个人信息',
        meta: {
          i18n: 'info'
        },
        component: () => import(/* webpackChunkName: "info-views" */ '@/views/system/userinfo')
      }
    ]
  },
  {
    path: '/work/process/leave',
    component: Layout,
    redirect: '/work/process/leave/form',
    children: [
      {
        path: 'form/:processDefinitionId',
        name: '请假流程',
        meta: {
          i18n: 'work'
        },
        component: () => import(/* webpackChunkName: "processDefinitionId-views" */ '@/views/work/process/leave/form')
      },
      {
        path: 'handle/:taskId/:processInstanceId/:businessId',
        name: '处理请假流程',
        meta: {
          i18n: 'work'
        },
        component: () => import(/* webpackChunkName: "handle-businessId" */ '@/views/work/process/leave/handle')
      },
      {
        path: 'detail/:processInstanceId/:businessId',
        name: '请假流程详情',
        meta: {
          i18n: 'work'
        },
        component: () => import(/* webpackChunkName: "detail-businessId" */ '@/views/work/process/leave/detail')
      }
    ]
  },
  {
    path: '/product/model-manage/searchflow-config',
    component: Layout,
    redirect: '/product/model-manage/searchflow-config/index',
    children: [
      {
        path: 'index',
        name: '添加工序API查询配置',
        component: () => import(/* webpackChunkName: "searchflow-config-views" */ '@/views/product/model-manage/searchflow-config/searchflow-config.vue')
      },
      {
        path: 'edit',
        name: '编辑工序API查询配置',
        component: () => import(/* webpackChunkName: "searchflow-edit-views" */ '@/views/product/model-manage/searchflow-config/searchflow-config.vue')
      }
    ]
  },
  {
    path: '/product/model-manage/stationflow-design',
    component: Layout,
    redirect: '/product/model-manage/stationflow-design/index',
    children: [
      {
        path: 'index',
        name: '添加工序API流程设计',
        component: () => import(/* webpackChunkName: "stationflow-design-views" */ '@/views/product/model-manage/stationflow-design/stationflow-design.vue')
      },
      {
        path: 'edit',
        name: '编辑工序API流程设计',
        component: () => import(/* webpackChunkName: "stationflow-design-edit-views" */ '@/views/product/model-manage/stationflow-design/stationflow-design.vue')
      }
    ]
  },
  {
    path: '/product/model-manage/station-op-template',
    component: () => import(/* webpackChunkName: "station-op-template" */ '@/views/product/model-manage/station-op-template/station-op-template.vue'),
    name: '',
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false
    }
  },
  {
    path: '/product/model-manage/stationui-design',
    component: Layout,
    redirect: '/product/model-manage/stationui-design/index', //index指代的就是import()中的path
    children: [
      {
        path: 'index',
        name: '添加UI界面设计',
        component: () => import(/* webpackChunkName: "stationui-design-index" */ '@/views/product/model-manage/stationui-design/stationui-design.vue')
      },
      {
        path: 'edit',
        name: '编辑UI界面设计',
        component: () => import(/* webpackChunkName: "stationui-design-edit" */ '@/views/product/model-manage/stationui-design/stationui-design.vue')
      }
      // import() path中最后加入.vue，是因文件夹中包含多个同名文件js/css/vue，不加找不到对应的页面文件
    ]
  },
  {
    path: '/product/model-manage/orderroute-design/',
    component: Layout,
    redirect: '/product/model-manage/orderroute-design/design',
    children: [
      {
        path: 'gdesign',
        name: `编辑工单工艺路线`,
        component: () => import(/* webpackChunkName: "orderroute-gdesign" */ '@/views/product/model-manage/orderroute-design/orderroute-design.vue')
      },
      {
        path: 'gread',
        name: `查看工单工艺路线`,
        component: () => import(/* webpackChunkName: "orderroute-gread" */ '@/views/product/model-manage/orderroute-design/orderroute-design.vue')
      },
      {
        path: 'pdesign',
        name: `设计产品工艺路线`,
        component: () => import(/* webpackChunkName: "orderroute-pdesign" */ '@/views/product/model-manage/orderroute-design/orderroute-design.vue')
      },
      {
        path: 'pread',
        name: `查看产品工艺路线`,
        component: () => import(/* webpackChunkName: "orderroute-pread" */ '@/views/product/model-manage/orderroute-design/orderroute-design.vue')
      }
    ]
  },
  {
    path: '/quality/inspect-template-application',
    component: Layout,
    redirect: '/quality/inspect-template-application',
    children: [
      {
        path: '',
        name: '检验模板应用',
        component: () => import(/* webpackChunkName: "inspect-template-application" */ '@/views/quality/inspect-template-application.vue'),
        meta: {
          keepAlive: true,
          isTab: false,
          isAuth: false
        }
      }
    ]
    // meta: {
    //   keepAlive: true,
    //   isTab: false,
    //   isAuth: false
    // }
  },
  {
    path: '/repair/repairExecOperation',
    component: Layout,
    redirect: '/repair/repairExecOperation',
    children: [
      {
        path: '',
        name: '维修执行',
        component: () => import(/* webpackChunkName: "repairExecOperation" */ '@/views/repair/repairExecOperation.vue'),
        meta: {
          keepAlive: true,
          isTab: true,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/repair/failureconfirm',
    component: Layout,
    redirect: '/repair/failureconfirm',
    children: [
      {
        path: '',
        name: '不良判定',
        component: () => import(/* webpackChunkName: "failureconfirm" */ '@/views/repair/failureconfirm.vue'),
        meta: {
          keepAlive: false,
          isTab: true,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/quality/refactor/editPlanConfig/:id?',
    component: Layout,
    redirect: '/quality/refactor/editPlanConfig',
    children: [
      {
        path: '',
        name: '首件检验计划配置',
        component: () => import(/* webpackChunkName: "editPlanConfig" */ '@/views/quality/refactor/editPlanConfig.vue'),
        meta: {
          keepAlive: true,
          isTab: false,
          isAuth: false
        },
        props: (route) => ({ id: route.query.id || '', type: route.query.type })
      }
    ]
  },
  {
    path: '/quality/refactor/processInspectionRecord',
    component: Layout,
    redirect: '/quality/refactor/processInspectionRecord',
    children: [
      {
        path: '',
        name: '制程巡检记录',
        component: () => import(/* webpackChunkName: "processInspectionRecord" */ '@/views/quality/refactor/processInspectionRecord.vue'),
        meta: {
          keepAlive: false,
          isTab: true,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/quality/refactor/shipmentRecord',
    component: Layout,
    redirect: '/quality/refactor/shipmentRecord',
    children: [
      {
        path: '',
        name: '出货检验记录',
        component: () => import(/* webpackChunkName: "shipmentRecord" */ '@/views/quality/refactor/shipmentRecord.vue'),
        meta: {
          keepAlive: false,
          isTab: true,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/quality/refactor/beforePackagingInspectRecords',
    component: Layout,
    redirect: '/quality/refactor/beforePackagingInspectRecords',
    children: [
      {
        path: '',
        name: '包装前检验记录',
        component: () => import(/* webpackChunkName: "beforePackagingInspectRecords" */ '@/views/quality/refactor/beforePackagingInspectRecords.vue'),
        meta: {
          keepAlive: false,
          isTab: true,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/quality/inspectionReportConfig/inspectionTemplateDesign',
    component: Layout,
    redirect: '/quality/inspectionReportConfig/inspectionTemplateDesign/index', //index指代的就是import()中的path
    children: [
      {
        path: 'index',
        name: '新增检验模板设计',
        component: () => import('@/views/quality/inspectionReportConfig/inspectionTemplateDesign.vue')
      },
      {
        path: 'edit',
        name: '编辑检验模板设计',
        component: () => import('@/views/quality/inspectionReportConfig/inspectionTemplateDesign.vue')
      }
      // import() path中最后加入.vue，是因文件夹中包含多个同名文件js/css/vue，不加找不到对应的页面文件
    ]
  },
  {
    path: '/quality/inspectionReportConfig/examine-searchflow-config',
    component: Layout,
    redirect: '/quality/inspectionReportConfig/examine-searchflow-config/index',
    children: [
      {
        path: 'index',
        name: '添加检验报告API查询配置',
        component: () => import(/* webpackChunkName: "searchflow-config-views" */ '@/views/quality/inspectionReportConfig/examine-searchflow-config.vue')
      },
      {
        path: 'edit',
        name: '编辑检验报告API查询配置',
        component: () => import(/* webpackChunkName: "searchflow-edit-views" */ '@/views/quality/inspectionReportConfig/examine-searchflow-config.vue')
      }
    ]
  }
  // {
  //   path: '/quality/refactor/editProcessPlanConfig',
  //   component: Layout,
  //   redirect: '/quality/refactor/editProcessPlanConfig',
  //   children: [
  //     {
  //       path: '',
  //       name: '制程巡检计划配置',
  //       component: () => import('@/views/quality/refactor/editProcessPlanConfig.vue'),
  //       meta: {
  //         keepAlive: true,
  //         isTab: false,
  //         isAuth: false
  //       },
  //       props({ query }) {
  //         id: query.id;
  //       }
  //     }
  //   ]
  // }
  // {
  //   path: '/report/report-config/report-config-preview',
  //   component: Layout,
  //   redirect: '/report/report-config/report-config-preview/index',
  //   children: [
  //     {
  //       path: 'index',
  //       name: '预览表格配置',
  //       component: () => import(/* webpackChunkName: "orderroute-design" */ '@/views/report/report-config/report-config-preview.vue')
  //     }
  //   ]
  // },
];
